CommandCut Class Reference

#include <CommandCut.h>

Inheritance diagram for CommandCut:

Command List of all members.

Public Member Functions

 CommandCut (OSGWindows *osgwind)
 CommandCut (OSGWindows *osgwind, TraffEduObject *obj)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
vector< TraffEduObject * > cutObjs_
vector< TraffEduObject * > tmpCutObjs_
vector< TraffEduObject * > tmpCopiedObjs_
int rightCLK
TraffEduObject * obj_

Detailed Description

Definition at line 7 of file CommandCut.h.


Constructor & Destructor Documentation

CommandCut::CommandCut (  OSGWindows *  osgwind  ) 
 

A constructor. Initializes osgwind_ and rightCLK variables. It is called if the cut operation is done from the menubar.

Parameters:
osgwind an OSGWindows pointer.

Definition at line 2 of file CommandCut.cpp.

References cutObjs_, OSGWindows::getSelectedObjects(), osgwind, osgwind_, and rightCLK.

CommandCut::CommandCut (  OSGWindows *  osgwind,
TraffEduObject *  obj
) 
 

A constructor. Initializes osgwind_, obj_, and rightCLK variables. It is called if the cut operation is done from the menubar.

Parameters:
osgwind an OSGWindows pointer.
obj a TraffEduObject pointer.

Definition at line 9 of file CommandCut.cpp.

References cutObjs_, obj_, osgwind, osgwind_, and rightCLK.


Member Function Documentation

bool CommandCut::execute (   )  [virtual]
 

do the cut operation.

Returns:
Operation success

Implements Command.

Definition at line 17 of file CommandCut.cpp.

References OSGWindows::clearCopiedObjects(), OSGWindows::clearCutObjects(), cutObjs_, OSGWindows::doDeleteGeode(), OSGWindows::getCopiedObjects(), OSGWindows::getCutObjects(), obj_, osgwind_, rightCLK, OSGWindows::setCutObjects(), tmpCopiedObjs_, and tmpCutObjs_.

bool CommandCut::unexecute (   )  [virtual]
 

undo the cut operation.

Returns:
Operation success

Implements Command.

Definition at line 37 of file CommandCut.cpp.

References OSGWindows::clearCutObjects(), cutObjs_, OSGWindows::doAddGeode(), osgwind_, rightCLK, OSGWindows::setCopiedObjects(), OSGWindows::setCutObjects(), OSGWindows::setSelectedObjects(), tmpCopiedObjs_, and tmpCutObjs_.


Member Data Documentation

vector<TraffEduObject*> CommandCut::cutObjs_ [private]
 

a private vector of TraffEduObjects. It holds the cut objects.

Definition at line 21 of file CommandCut.h.

Referenced by CommandCut(), execute(), and unexecute().

TraffEduObject* CommandCut::obj_ [private]
 

a private variable. It is used to hold the cut object.

Definition at line 45 of file CommandCut.h.

Referenced by CommandCut(), and execute().

OSGWindows* CommandCut::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 15 of file CommandCut.h.

Referenced by CommandCut(), execute(), and unexecute().

int CommandCut::rightCLK [private]
 

a private variable. It shows if the CommandCut is called from the RightClickMenu or not.

Definition at line 39 of file CommandCut.h.

Referenced by CommandCut(), execute(), and unexecute().

vector<TraffEduObject*> CommandCut::tmpCopiedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the copied objects before cut operation is done.

Definition at line 33 of file CommandCut.h.

Referenced by execute(), and unexecute().

vector<TraffEduObject*> CommandCut::tmpCutObjs_ [private]
 

a private vector of TraffEduObjects. It holds the cut objects before cut operation is done.

Definition at line 27 of file CommandCut.h.

Referenced by execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO